﻿using Authentication.Core.Configuration;
using Authentication.Model.Model;
using Common.Data.Extensions;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Authentication.Core.Data.DBConfig
{
    public class ChangeDaoCifConfiguration : DBConfig<ChangeDaoCif>
    {
        public ChangeDaoCifConfiguration()
            : base(SystemConfiguration.Schema, SystemConfiguration.NamingType, SystemConfiguration.TABLE_PREFIX)
        {
            HasKey(k => new { k.Id }).Property(k => k.Id).HasColumnName("Id").HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity).IsRequired();
            //has

            //relationship
            //HasOptional(t => t.ChangeDaoProducts).WithMany(c => c.).HasForeignKey(t => new { t.BranchCodeSme }).WillCascadeOnDelete(false);
            //HasMany(t => t.ChangeDaoProductCheckeds).WithRequired(c => c.ChangeDaoCif).HasForeignKey(k => k.ChangeDaoCifId).WillCascadeOnDelete(false);
        }
    }
}
